com.supermap.ar.areffect
Class ARGltfElement
- java.lang.Object
-
- com.supermap.ar.areffect.AREffectElement
-
- com.supermap.ar.areffect.ARGltfElement
-
public class ARGltfElement extends AREffectElement
AR special object - Gltf model
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.ar.areffect.AREffectElement
AREffectElement.onRenderableLoadCompleteListener, AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType
-
-
Constructor Summary
Constructors Constructor and Description ARGltfElement(android.content.Context context)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Gltf
getGltfModel()
Get the GLTF instance Only valid after#setGltfModel(Gltf)
is set。Renderable
getRenderable()
boolean
isShadowCaster()
Whether it can produce shadowsboolean
isShadowReceiver()
Can accept shadowsvoid
loadModel(Gltf gltf)
Loads model Instance built byGltf
void
loadModel(int resourceId)
Loads model Resources need to be placed in the resource/raw/ directoryvoid
loadModel(java.lang.String resourceUri)
Loads model Mobile phone local file path or online addressvoid
reLoadModel()
Loads models againvoid
setGltfModel(Gltf gltfModel)
Set up the GLTF instancevoid
setShadowCaster(boolean flag)
Sets whether shadows can be cast in the scenevoid
setShadowReceiver(boolean flag)
Sets whether shadows cast on this instance by other elements can be rendered-
Methods inherited from class com.supermap.ar.areffect.AREffectElement
addChild, addChilds, addOnTapListener, addOnTouchListener, clearAllChilds, destroy, getAllChilds, getChild, getChild, getChild, getChildCount, getElementType, getId, getLocalScaleFactor, getOnRenderableLoadCompleteListener, getPosition, getPositionType, getRelativePosition, getRotationAngle, getRotationAxis, getScaleFactor, getWGSCoordinates, isTransformable, isVisible, removeChild, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, setElementName, setLocalScaleFactor, setOnRenderableLoadCompleteListener, setParentNode, setParentNode, setParentNode, setPosition, setRelativePosition, setRelativePosition, setRotateAlwaysToCamera, setRotateToCameraType, setRotationAngle, setScaleFactor, setTransformable, setVisiblity, setWGSCoordinates
-
-
-
-
Constructor Detail
-
ARGltfElement
public ARGltfElement(android.content.Context context)
The constructor.- Parameters:
context
-
-
-
Method Detail
-
getRenderable
public Renderable getRenderable()
-
loadModel
public void loadModel(java.lang.String resourceUri)
Loads modelMobile phone local file path or online address
- Parameters:
resourceUri
-
-
loadModel
public void loadModel(int resourceId)
Loads modelResources need to be placed in the resource/raw/ directory
- Parameters:
resourceId
-
-
reLoadModel
public void reLoadModel()
Loads models again
-
getGltfModel
public Gltf getGltfModel()
Get the GLTF instanceOnly valid after
#setGltfModel(Gltf)
is set。- Returns:
-
setGltfModel
public void setGltfModel(Gltf gltfModel)
Set up the GLTF instance- Parameters:
gltfModel
-
-
setShadowCaster
public void setShadowCaster(boolean flag)
Sets whether shadows can be cast in the scene- Overrides:
setShadowCaster
in classAREffectElement
- Parameters:
flag
-
-
setShadowReceiver
public void setShadowReceiver(boolean flag)
Sets whether shadows cast on this instance by other elements can be rendered- Overrides:
setShadowReceiver
in classAREffectElement
- Parameters:
flag
-
-
isShadowCaster
public boolean isShadowCaster()
Whether it can produce shadows- Overrides:
isShadowCaster
in classAREffectElement
- Returns:
-
isShadowReceiver
public boolean isShadowReceiver()
Can accept shadows- Overrides:
isShadowReceiver
in classAREffectElement
- Returns:
-
-